package com.slz3.business.module.financeManagement.finFinanceManage.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.financeManagement.finFinanceManage.domain.FinFinanceManage;
import com.slz3.business.module.financeManagement.finFinanceManage.domain.FinFinanceManageCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class FinFinanceManageResController extends FinFinanceManageResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, FinFinanceManage finFinanceManage) {
        if (FinFinanceManageResUnsafeValid.add(req, finFinanceManage)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$FinFinanceManageUpdateLock(req, finFinanceManage);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, FinFinanceManageCondition finFinanceManageCondition) {
        if (FinFinanceManageResUnsafeValid.delete(req, finFinanceManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$FinFinanceManageUpdateLock(req, finFinanceManageCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, FinFinanceManage finFinanceManage) {
        if (FinFinanceManageResUnsafeValid.modify(req, finFinanceManage)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$FinFinanceManageUpdateLock(req, finFinanceManage);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (FinFinanceManageResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return finFinanceManageResAtomic.info_$FinFinanceManageUpdateLock(req);
        if (FinFinanceManageResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$FinFinanceManageUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (FinFinanceManageResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, FinFinanceManageCondition finFinanceManageCondition) {
        //
        if (FinFinanceManageResUnsafeValid.auditSubmit(req, finFinanceManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$FinFinanceManageUpdateLock(req, finFinanceManageCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, FinFinanceManageCondition finFinanceManageCondition) {
        if (FinFinanceManageResUnsafeValid.audit(req, finFinanceManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$FinFinanceManageUpdateLock(req, finFinanceManageCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, FinFinanceManageCondition finFinanceManageCondition) {
        if (FinFinanceManageResUnsafeValid.auditReject(req, finFinanceManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$FinFinanceManageUpdateLock(req, finFinanceManageCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, FinFinanceManageCondition finFinanceManageCondition) {
        if (FinFinanceManageResUnsafeValid.usingEnable(req, finFinanceManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$FinFinanceManageUpdateLock(req, finFinanceManageCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, FinFinanceManageCondition finFinanceManageCondition) {
        if (FinFinanceManageResUnsafeValid.usingDisable(req, finFinanceManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$FinFinanceManageUpdateLock(req, finFinanceManageCondition);
        }
    }

}
